package cn.toolck.controller;

import cn.toolck.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName CodeController
 * @Description TODO
 * @Author Toolck Rin
 * @Date 2021/5/19 17:47
 * @Version 1.0
 **/
@RestController
@RequestMapping("/email")
public class EmailController {
    @Autowired
    private EmailService emailService;

    @GetMapping("/{email}/{code}")
    public boolean sendCode(@PathVariable("email") String email, @PathVariable("code") String code){
        return emailService.sendCode(email,code);
    }
}
